package guoanmaker.operator.business.model;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import guoanmaker.operator.helper.common.abstractobj.IdEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
 * 
* @ClassName: PersonalAddress 
* @Description: 地址实体
* @author Yvonne_MGL
* @date 2017年8月16日 上午10:59:44 
*  
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="t_personal_address")
public class PersonalAddress extends IdEntity{
	
	private String name;//姓名
	private String address;//地址
	private String telephone;//电话
	private String isdefault;//是否为默认收货地址,1为是,0为否
	@ManyToOne(cascade=CascadeType.REFRESH,optional=false)
	@JoinColumn(name = "user_id")
	private PersonalUser user;//关联用户

}
